package com.ruoyi.workbench.service;

import com.alibaba.fastjson2.JSONObject;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.workbench.domain.WorkMatter;
import com.ruoyi.workbench.domain.WorkReport;
import com.ruoyi.workbench.domain.WorkTargetTask;
import com.ruoyi.workbench.domain.WorkTask;
import com.ruoyi.workbench.dto.*;

import java.util.List;
import java.util.Map;
import java.util.Map;

/**
 * 事项(WorkMatter)表服务接口
 *
 * @author makejava
 * @since 2024-07-04 10:46:30
 */
public interface WorkMatterService {

    /**
     * 新增数据
     *
     * @param workMatter 实例对象
     * @return 实例对象
     */
    WorkMatter insert(WorkMatter workMatter);

    /**
     * 查询首页列表
     * @param matter
     * @param pageDomain
     */
    PageInfo<WorkMatter> getIndexList(WorkMatter matter, PageDomain pageDomain);

    /**
     * 查询事项列表
     *
     * @param matter 事项
     * @return 集合
     */
    public List<WorkMatter> getDataScopeMatterList(WorkMatter matter);

    /**
     * 通过ID查询单条数据
     *
     * @param matterId 主键
     * @return 实例对象
     */
    WorkMatter queryById(Integer matterId);


    public int deleteMatterIds(Long[] matterIds);


    /**
     * 修改数据
     *
     * @param workMatter 实例对象
     * @return 实例对象
     */
    WorkMatter update(WorkMatter workMatter);

    /**
     * 通过主键删除数据
     *
     * @param matterId 主键
     * @return 是否成功
     */
    boolean deleteById(Long matterId);


    List<UsersDTO> getUsers();

    /**
     * 查询指标
     * @return
     */
    List<RelatedIndicatorOrTaskRequest> getTargetTasks();

    /**
     * 查询任务
     * @return
     */
    List<RelatedIndicatorOrTaskRequest> getTasks();


    List<OptionUtile> getSystemManage();


    PageInfo<WorkTask> listTask(ListTaskRequest request, PageDomain pageDomain);

    boolean taskClaim(Integer taskId);

    PageInfo<WorkMatter> dialogList(WorkMatter matter, PageDomain pageDomain);

    void updteFollowed(WorkMatter matter);


    List<Map<String,Object>> getPracticables(String matterId);

    void updateDialog(String dialogId,String dialogContent);




    AjaxResult getMatterList();

    AjaxResult getInfo(Integer sid);

    void updateTaskStat(Integer relatedIndicatorOrTaskId);


    List<WorkReport> getReports(String matterId);

    PageInfo<WorkMatter> getMyMatterPage(JSONObject params);

    void matterClaim(Map<String, Object> params);
}
